<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<%@ include file="include.jsp" %>
<%@ taglib uri="/spring" prefix="spring" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Edit Bike</title>
</head>
<body>
<h1>Edit Bike</h1>
<form method="POST" >
<spring:hasBindErrors name="bike"><b>Please fix all errors!</b></spring:hasBindErrors>
<table border="1" cellpadding="2" cellspacing="2">
	<tr>
		<td align="right">Manufacturer:</td>
		<td>
			<spring:bind path="bike.manufacturer">
				<input type="text" name="manufacturer" value="<c:out value="${status.value}" />"/>
				<font color="red"><c:out value="${status.errorMessage}"/></font>
			</spring:bind>
		</td>
	</tr>
	<tr>
		<td align="right">Model:</td>
		<td>
			<spring:bind path="bike.model">
				<input type="text" name="model" value="<c:out value="${status.value}" />"/>
				<font color="red"><c:out value="${status.errorMessage}"/></font>
			</spring:bind>
		</td>
	</tr>
	<tr>
		<td align="right">Frame:</td>
		<td>
			<spring:bind path="bike.frame">
				<input type="text" name="frame" value="<c:out value="${status.value}" />"/>
				<font color="red"><c:out value="${status.errorMessage}"/></font>
			</spring:bind>
		</td>
	</tr>
	<tr>
		<td align="right">Serial Number:</td>
		<td>
			<spring:bind path="bike.serialNo">
				<input type="text" name="serialNo" value="<c:out value="${status.value}" />"/>
				<font color="red"><c:out value="${status.errorMessage}"/></font>
			</spring:bind>
		</td>
	</tr>
	<tr>
		<td align="right">Weight:</td>
		<td>
			<spring:bind path="bike.weight">
				<input type="text" name="weight" value="<c:out value="${status.value}" />"/>
				<font color="red"><c:out value="${status.errorMessage}"/></font>
			</spring:bind>
		</td>
	</tr>
	<tr>
		<td align="right">Status:</td>
		<td>
			<spring:bind path="bike.status">
				<input type="text" name="status" value="<c:out value="${status.value}" />"/>
				<font color="red"><c:out value="${status.errorMessage}"/></font>
			</spring:bind>
		</td>
	</tr>
</table>
<input type="submit" value="submit">
</form>
</body>
</html>